package com.asman.worker.multishow

import android.content.Context
import android.util.AttributeSet
import android.widget.MediaController

class MyMediaController : MediaController {

    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)

    constructor(context: Context, useFastForward: Boolean) : super(context, useFastForward)

    constructor(context: Context) : super(context)

    interface OnShowOrHideListener {
        fun show()

        fun hide()
    }

    var listener: OnShowOrHideListener? = null

    fun setOnShowOrHideListener(listener: OnShowOrHideListener) {
        this.listener = listener
    }

    override fun show(timeout: Int) {
        super.show(timeout)
        listener?.show()
    }

    override fun hide() {
        super.hide()
        listener?.hide()
    }
}
